<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>	
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<script>
	var evtSource = new EventSource("");
	evtSource.onmessage = function(e) {
		var newElement = document.createElement("li");
		newElement.innerHTML = "message: " + e.data;
		eventList.appendChild(newElement);
	};
</script>
</head>
<body>
	<nav class="top1 navbar navbar-default navbar-static-top"
		role="navigation" style="margin-bottom: 0">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse"
				data-target=".navbar-collapse">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="index.jsp">中电39所项目管理系统</a>
		</div>
		
		<ul class="nav navbar-nav navbar-right">
				<li class="dropdown">
	        		<a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-comments-o"></i><span class="badge">4</span></a>
	        		<ul class="dropdown-menu">
						<li class="dropdown-menu-header">
							<strong>消息</strong>
						</li>
						
						
						
						<li class="avatar">
							<a href="#">
								<img src="images/1.png" alt=""/>
								<div>创建项目</div>
								<small>1分钟前</small>
								<span class="label label-info">NEW</span>
							</a>
						</li>
						
						<li class="dropdown-menu-footer text-center">
							<a href="#">查看更多</a>
						</li>	
	        		</ul>
	      		</li>
	      		<!--  
			    <li class="dropdown">
	        		<a href="#" class="dropdown-toggle avatar" data-toggle="dropdown"><img src="images/1.png" alt=""/><span class="badge">9</span></a>
	        		<ul class="dropdown-menu">
						<li class="dropdown-menu-header text-center">
							<strong>Account</strong>
						</li>
						<li class="m_2"><a href="#"><i class="fa fa-bell-o"></i> Updates <span class="label label-info">42</span></a></li>
						<li class="m_2"><a href="#"><i class="fa fa-envelope-o"></i> Messages <span class="label label-success">42</span></a></li>
						<li class="m_2"><a href="#"><i class="fa fa-tasks"></i> Tasks <span class="label label-danger">42</span></a></li>
						<li><a href="#"><i class="fa fa-comments"></i> Comments <span class="label label-warning">42</span></a></li>
						<li class="dropdown-menu-header text-center">
							<strong>Settings</strong>
						</li>
						<li class="m_2"><a href="#"><i class="fa fa-user"></i> Profile</a></li>
						<li class="m_2"><a href="#"><i class="fa fa-wrench"></i> Settings</a></li>
						<li class="m_2"><a href="#"><i class="fa fa-usd"></i> Payments <span class="label label-default">42</span></a></li>
						<li class="m_2"><a href="#"><i class="fa fa-file"></i> Projects <span class="label label-primary">42</span></a></li>
						<li class="divider"></li>
						<li class="m_2"><a href="#"><i class="fa fa-shield"></i> Lock Profile</a></li>
						<li class="m_2"><a href="#"><i class="fa fa-lock"></i> Logout</a></li>	
	        		</ul>
	      		</li>
		 -->
			</ul>
		<form class="navbar-form navbar-right">
			<c:choose>
				<c:when test="${sessionScope.user != null}">
					欢迎您，<span style="color:red;font-weight: bold;"><a href="user_info.jsp">${sessionScope.user.user_name}</a></span>！
				</c:when>
				<c:otherwise>
					你好，请先<a href="login.jsp">登录</a>！
				</c:otherwise>
			</c:choose>
		</form>
		
		<div class="navbar-default sidebar" role="navigation">
			<div class="sidebar-nav navbar-collapse">
				<ul class="nav" id="side-menu">
					<li><a href="#"><i class="fa fa-laptop nav_icon"></i>项目管理<span
							class="fa arrow"></span> </a>
						<ul class="nav nav-second-level">
							<li><a href="preCreateProject">&nbsp;&nbsp;&nbsp;&nbsp;项目创建</a></li>
							<li><a href="getAllProjectList">&nbsp;&nbsp;&nbsp;&nbsp;项目维护</a></li>
							<li><a href="client_add.jsp">&nbsp;&nbsp;&nbsp;&nbsp;添加合同甲方</a></li>
						</ul>
					</li>
					<li><a href="#"><i class="fa fa-laptop nav_icon"></i>计划策划<span
							class="fa arrow"></span> </a>
						<ul class="nav nav-second-level">
							
							<li>
								<c:choose>
									<c:when test="${sessionScope.user.role.id == 2 }">
										<a href="preCreateFirstplan?role_id=${sessionScope.user.role.id}&user_id=${sessionScope.user.id}">&nbsp;&nbsp;&nbsp;&nbsp;一级计划创建</a>
									</c:when>
									<c:when test="${sessionScope.user.role.id == 3 }">
										<a href="preCreateFirstplan?role_id=${sessionScope.user.role.id}&user_id=${sessionScope.user.id}">&nbsp;&nbsp;&nbsp;&nbsp;一级计划审批</a>
									</c:when>
							</c:choose>
							</li>
							<li><a href="findReleasedPlan?opcode=firstplan_update">&nbsp;&nbsp;&nbsp;&nbsp;一级计划更动</a>
							</li>
							<!-- 
							<li><a href="#">&nbsp;&nbsp;&nbsp;&nbsp;一级计划发布</a>
							</li> -->
						</ul>
					</li>
					<li><a href="#"><i class="fa fa-indent nav_icon"></i>计划监控<span
							class="fa arrow"></span> </a>
						<ul class="nav nav-second-level">
							<li><a href="findReleasedPlan?opcode=firstplan_check">&nbsp;&nbsp;&nbsp;&nbsp;
							<c:choose>
							<c:when test="${sessionScope.user.role.id == 1 or sessionScope.user.role.id == 5}">
							一级计划查看
							</c:when>
							<c:otherwise>
							一级计划检查
							</c:otherwise>
							</c:choose>
							</a>
							</li>
							<li><a href="#">&nbsp;&nbsp;&nbsp;&nbsp;一级计划运行报表生成</a>
							</li>
							<li><a href="#">&nbsp;&nbsp;&nbsp;&nbsp;项目运行档案纪录</a>
							</li>
						</ul>
					</li>
					<!-- 
					<li><a href="#"><i class="fa fa-envelope nav_icon"></i>计划运行协调 <span class="fa arrow"></span></a>
						<ul class="nav nav-second-level">
							<li><a href="#">&nbsp;&nbsp;&nbsp;&nbsp;发起协调</a>
							</li>
							<li><a href="#">&nbsp;&nbsp;&nbsp;&nbsp;处理协调</a>
							</li>
						</ul> /.nav-second-level
					</li> -->
					
					<c:if test="${sessionScope.user.role.id == 4}">
					
						<li><a href="#"><i class="fa fa-check-square-o nav_icon"></i>系统管理(仅限admin权限)<span
								class="fa arrow"></span> </a>
							<ul class="nav nav-second-level">
								<li><a href="findAllUser">&nbsp;&nbsp;&nbsp;&nbsp;人员信息管理</a>
								</li>
								<li><a href="loadAddUsersInfo">&nbsp;&nbsp;&nbsp;&nbsp;添加用户</a>
								</li>
							</ul>
						</li>
						
					</c:if>
					<li><a href="findSpecialNodes"><i class="fa fa-check-square-o nav_icon"></i>计划大纲 </a>
					<li><a href="schedule?userID=${sessionScope.user.id }&roleID=${sessionScope.user.role.id}"><i class="fa fa-check-square-o nav_icon"></i>我的待办 </a>
					</li>
					<li><a href="logout"><i class="fa fa-check-square-o nav_icon"></i>注销 </a>
					</li>
				</ul>
			</div>
			<!-- /.sidebar-collapse -->
		</div>
		<!-- /.navbar-static-side -->
	</nav>
</body>
</html>